package com.rd.student.jiaji.class4.suyan.zrrd.Study;

//import com.zrrd.day08.A;

import java.lang.reflect.Array;
import java.util.Arrays;

public class MyArraysTest {
    public static void main(String[] args) {
        MyArrays myArrays=new MyArrays();
        int[] arr=new int[]{34,65,87,9,98,99,95,76};
        System.out.println("最大值"+myArrays.getMax(arr));
        System.out.println("最小值"+myArrays.getMin(arr));
        System.out.println("总和"+myArrays.getSum(arr));
        System.out.println("平均值"+myArrays.getAvg(arr));
      //复制数组
        int[] arr4=myArrays.copy(arr);
        System.out.println(Arrays.toString(arr4));
        System.out.println("-----------");
       int index=myArrays.LinearSearch(arr,34);//查找数组
        if (index==0){
            System.out.println("找到了,位置为"+index);
        }else {
            System.out.println("未找到");
        }
        System.out.println("-----------");
       //排序

        int[] arr3=myArrays.sort(arr);
        System.out.println(Arrays.toString(arr3));
        System.out.println("-----------");
        myArrays.print(arr);//遍历数组


    }
}
